var STip = ZFT.Util.STip;

var ParseTemplate = ZFT.Util.ParseTemplate;
var Template = {
    ucenter: ParseTemplate(require("../tpl/ucenter.xtpl")),
}
var BaseInfo = ZFT.Util.Class({
    container: $("body"),
    __canLoad: true,
    init: function () {
       
    },
    EVENTS: {
        "click #uCenter": "loadUcenter",
    },
    loadUcenter: function (e) {
        var tar = (e) ? $(e.currentTarget) : $("#uCenter"),
            _this = this,
            dtype=ZFT.Util.getDtype(),
            html,
            host=window.location.host,
            data,
            hostArr={"zft.12301.local":"12301.local","zft.12301.test":"12301.test","www.louxiaomei.com":"louxiaomei.com","louxiaomei.com":"louxiaomei.com"},
            pathArr={"zft.12301.local":"local/","zft.12301.test":"","www.louxiaomei.com":"","louxiaomei.com":""};
        if (tar.hasClass("active") && _this.__canLoad === false) return false;
        tar.addClass("active").siblings().removeClass("active");
        data={
            dtype:dtype,
            host:hostArr[host],
            path:pathArr[host]
            
        }
       // console.log(data)
        html=Template.ucenter({data:data})
        $("#centerContent").html(html);

    },


})

$(function () {
    new BaseInfo();
})